<%--
  Created by IntelliJ IDEA.
  User: Root
  Date: 14.12.13
  Time: 0:27
  To change this template use File | Settings | File Templates.
--%>
<%
    String fileName = request.getParameter("name");
    if (fileName == null) {
        response.sendRedirect("login.html");
    }
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Downloading shared file</title>
    <script src="/cful/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="crypto/core.js" language="JavaScript"></script>
    <script type="text/javascript" src="crypto/enc-base64.js" language="JavaScript"></script>
    <script type="text/javascript" src="crypto/md5.js" language="JavaScript"></script>
    <script type="text/javascript" src="crypto/evpkdf.js" language="JavaScript"></script>
    <script type="text/javascript" src="crypto/cipher-core.js" language="JavaScript"></script>
    <script type="text/javascript" src="crypto/rabbit.js" language="JavaScript"></script>
    <script src="/cful/fileSaver.js"></script>
    <script src="/cful/dl.js"></script>
</head>
<body>

<table cellspacing="0" cellpadding="1" width=30% align="center" bgcolor="#CCCCCC" border="0">
    <tbody>
    <tr valign="top">
        <td>
            <table cellspacing="0" cellpadding="4" width="100%" bgcolor="#EEEEEE" border="0">
                <tbody>
                <tr bgcolor="#000000">
                    <td bgcolor="#999999" valign="top" width="20%">
                        <p align="center">
                            <span style="color: #FFFFFF; font-size: large; ">
                                <b>CryptedFilesStorage project: downloading file</b>
                            </span>
                        </p>
                    </td>
                </tr>

                <tr valign="top">
                    <td align="center">
                        <span style="font-size: medium; ">
                            <strong>Enter decryption key:</strong>
                        </span>
                        <input class="pass">
                        <a onclick="window.download('/cful/upload_file?fileName=<% out.print(fileName); %>', this);"
                           href="javascript: void(0);">Download</a></br>
                        <img src="loading.gif" class="loading" style="display:none;">
                    </td>
                </tr>
                </tbody>
            </table>
        </td>
    </tr>
    </tbody>
</table>


</body>
</html>
